Skip to content

Dockerized the project#112

Merged
Akash-nath29 merged 5 commits intodevfrom
feature
Jan 27, 2026
Merged

Dockerized the project#112
Akash-nath29 merged 5 commits intodevfrom
feature

Conversation

@Akash-nath29
Copy link
Owner

This pull request introduces support for a new persistent skills prompt (Skills.md) in the project directory, improves prompt construction logic to prioritize skills and task guidance, and adds Docker support for easier backend setup. It also includes comprehensive unit tests for the new prompt loading logic and updates documentation accordingly.

Prompt enhancements:

  • Added support for loading a persistent skills prompt from Skills.md in the project directory, which is prepended to all user prompts to provide consistent guidance across tasks. The prompt construction logic now prioritizes: system prompt, skills prompt (Skills.md), task prompt (Coderrr.md), and then the user request. [1] [2] [3] [4]
  • Updated protected paths to include Skills.md, preventing accidental deletion.

Testing improvements:

  • Added a new unit test suite (skills.test.js) to verify loading behavior for Skills.md and Coderrr.md, as well as the correct priority and construction of the enhanced prompt.

Docker and development environment:

  • Added a backend Dockerfile and docker-compose.yml for streamlined local development and deployment using Docker, with hot-reloading enabled for the backend. [1] [2]
  • Added a .dockerignore file to optimize Docker context and exclude unnecessary files.

Documentation:

  • Updated the README.md to document Docker-based backend setup as the recommended option, alongside manual setup instructions.

Akash-nath29 and others added 5 commits January 23, 2026 03:37
Implement plain text query and fixed dynamic memory update
Fix Coderrr.md issues and .coderrr/memory.json issues
@Akash-nath29 Akash-nath29 added the ECWoC26 Project For ECWoC 26 label Jan 27, 2026
Copilot AI review requested due to automatic review settings January 27, 2026 09:04
@vercel
Copy link

vercel bot commented Jan 27, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Review Updated (UTC)
coderrr-backend Ready Ready Preview, Comment Jan 27, 2026 9:04am

@github-actions
Copy link

🚀 Thanks for opening a Pull Request!

A maintainer will review this soon.

Meanwhile:
✔ Ensure tests are passing
✔ Link related issues
✔ Code follows the project guidelines

Your contribution helps make this project better!

@Akash-nath29 Akash-nath29 merged commit 74df995 into dev Jan 27, 2026
34 checks passed
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This pull request adds Docker support for the Coderrr backend to simplify local development and deployment. Despite the extensive PR description mentioning Skills.md prompt enhancements and test additions, the actual changes only include Docker configuration files and documentation updates.

Changes:

  • Added Dockerfile for the Python FastAPI backend with multi-stage build optimization
  • Added docker-compose.yml for orchestrating the backend service with hot-reloading
  • Updated README.md to document Docker as the recommended setup option
  • Added .dockerignore to optimize Docker build context

Reviewed changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 10 comments.

File Description
backend/Dockerfile Defines the Python 3.11-slim base image, installs dependencies, and sets up the FastAPI backend
docker-compose.yml Configures the backend service with port mapping, volume mounts, and development settings
.dockerignore Excludes unnecessary files from Docker build context (node_modules, Python cache, etc.)
README.md Documents Docker setup as the recommended option alongside manual setup instructions

Comment on lines +1 to +2


Copy link

Copilot AI Jan 27, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The docker-compose.yml file is missing the version field at the top. While this is optional in Docker Compose v2+, it's considered a best practice to include it for clarity and compatibility. Most Docker Compose files in production use "version: '3.8'" or similar to explicitly declare the Compose file format version.

Suggested change
version: '3.8'

Copilot uses AI. Check for mistakes.
Comment on lines +16 to +18
# Load environment variables from .env file if it exists
env_file:
- .env
Copy link

Copilot AI Jan 27, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The .env file path is specified as a root-level file, but based on the project structure, API keys and secrets should be in backend/.env (as indicated by backend/.env.example). The env_file path should be "./backend/.env" to correctly load the backend's environment variables containing GITHUB_TOKEN, MISTRAL_API_KEY, etc. The current configuration will fail to load API credentials needed for the AI backend to function.

Suggested change
# Load environment variables from .env file if it exists
env_file:
- .env
# Load environment variables from backend/.env file if it exists
env_file:
- ./backend/.env

Copilot uses AI. Check for mistakes.
.dockerignore

# Environment
.env
Copy link

Copilot AI Jan 27, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The .dockerignore file excludes the .env file, which means environment variables won't be available in the container. Combined with the env_file issue in docker-compose.yml, this ensures the backend will not have access to required API credentials (GITHUB_TOKEN, MISTRAL_API_KEY, etc.). While excluding .env from the Docker image is a security best practice, the docker-compose.yml must correctly mount or load the environment file for the container to access these variables at runtime.

Suggested change
.env

Copilot uses AI. Check for mistakes.
Comment on lines +11 to +12
volumes:
- ./backend:/app
Copy link

Copilot AI Jan 27, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The volume mount "./backend:/app" creates a bind mount that overwrites the /app directory in the container with the local backend directory. This means that the Python dependencies installed during the Docker build (in the image) will be overwritten by the local directory contents, which doesn't include the installed packages. This will cause import errors when the backend tries to import dependencies like fastapi, uvicorn, etc.

A common solution is to use a named volume for the Python packages directory or exclude it from the bind mount. Alternatively, dependencies could be installed in the command, but this defeats the purpose of using Docker layers for caching.

Copilot uses AI. Check for mistakes.
Comment on lines +26 to +27
# Run the application
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "5000"]
Copy link

Copilot AI Jan 27, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The Dockerfile doesn't specify a non-root user to run the application. Running containers as root is a security risk. Best practice is to create a non-privileged user and switch to it before running the application. This is especially important for production deployments.

Copilot uses AI. Check for mistakes.
Comment on lines +13 to +15
environment:
- HOST=0.0.0.0
- PORT=5000
Copy link

Copilot AI Jan 27, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The environment variables HOST and PORT are set in docker-compose.yml but these are not standard environment variables used by uvicorn. Uvicorn reads command-line arguments or standard variables. The --host and --port flags in the command override these environment variables anyway, making them redundant. If the intention was to make these configurable, they should be used in the command like: command: uvicorn main:app --host ${HOST:-0.0.0.0} --port ${PORT:-5000} --reload

Suggested change
environment:
- HOST=0.0.0.0
- PORT=5000

Copilot uses AI. Check for mistakes.
dockerfile: Dockerfile
container_name: coderrr-backend
ports:
- "5000:5000"
Copy link

Copilot AI Jan 27, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The backend port configuration is inconsistent. The docker-compose.yml maps port 5000:5000 and the backend Dockerfile exposes port 5000, but the root .env.example file shows CODERRR_BACKEND=http://localhost:8000. According to the coding guidelines, the backend runs on port 5000, not 8000. When users run the backend via Docker, the CLI will try to connect to port 8000 by default (from .env.example), which will fail to connect to the Dockerized backend on port 5000.

Suggested change
- "5000:5000"
- "8000:5000"

Copilot uses AI. Check for mistakes.
Comment on lines +32 to +34
docker-compose.yml
Dockerfile
.dockerignore
Copy link

Copilot AI Jan 27, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The .dockerignore file excludes docker-compose.yml, Dockerfile, and .dockerignore itself from the Docker build context. However, these files are in the root directory while the Docker build context is set to "./backend" in docker-compose.yml. These exclusions have no effect since the files aren't in the backend directory. Additionally, excluding docker-compose.yml and Dockerfile from the build context is unnecessary since they wouldn't be copied anyway - the COPY commands in the Dockerfile only copy requirements.txt and the application code.

Suggested change
docker-compose.yml
Dockerfile
.dockerignore

Copilot uses AI. Check for mistakes.
Comment on lines +358 to +363
#### Option A: Docker (Recommended)

```bash
docker compose up --build
```
The backend will be started at `http://localhost:5000` with hot-reloading enabled.
Copy link

Copilot AI Jan 27, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The Docker setup instructions mention that the backend will be available at http://localhost:5000, but don't include any instructions for setting up the required environment variables (GITHUB_TOKEN, MISTRAL_API_KEY, etc.) that the backend needs to function. Users following the Docker setup will encounter errors when the backend tries to connect to AI providers without these credentials. The documentation should mention creating a backend/.env file from backend/.env.example before running docker compose up.

Copilot uses AI. Check for mistakes.
@@ -0,0 +1,21 @@


services:
Copy link

Copilot AI Jan 27, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The PR title is "Dockerized the project" and the description extensively mentions Skills.md prompt enhancements, test suite additions, and changes to agent.js and fileOps.js. However, the actual code changes in this PR only include Docker configuration files (Dockerfile, docker-compose.yml, .dockerignore) and documentation updates. The Skills.md-related changes mentioned in the description are not present in this PR's diffs, suggesting they may have been merged previously or are being mistakenly included in this PR's description. The PR description should be updated to accurately reflect only the Docker-related changes.

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ECWoC26-L3 ECWoC26 Project For ECWoC 26

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

Comments